import request from '@/utils/request'
import defaultSettings from '@/settings'

/**
 * 分页 数据源配置表
 * @param {*} query 
 */
export function list(query) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/tools/datasource/list',
    method: 'post',
    data: query
  })
}

/**
 * 新增或修改数据源配置
 * @param {*} data 
 */
export function submit(data) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/tools/datasource/submit',
    method: 'post',
    data: data
  })
}

/**
 * 删除 数据源配置表
 * @param {*} ids 
 */
export function removeByIds(ids) {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/tools/datasource/removeByIds?ids='+ids,
    method: 'get'
  })
}

/**
 * 数据源列表
 */
export function select() {
  return request({
    url: defaultSettings.serviceUrl.moon_fast + '/tools/datasource/select',
    method: 'get'
  })
}
